package cn.openea.perpartner.componet.website;

import cn.openea.perpartner.common.auth.entity.LoginBody;
import cn.openea.perpartner.componet.util.UserContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author ysk
 * @version 1.0.1
 * @Description TODO
 * @createTime 2023年04月07日 16:45:00
 */
@Slf4j
@Controller
public class WebsiteTemplateController {

    @RequestMapping("/")
    public String index(Model model, HttpServletRequest request) {
        //1.获取用户登录信息
        LoginBody loginUser = UserContext.getLoginUser();
        model.addAttribute("loginUser", loginUser);
        return "index";
    }
}
